(function(){ if(window.superfish){ } else { if( window == top ){ if( window.location.href.indexOf( "amazon.com/" ) > 0 && window.location.href.indexOf( "/search/" ) > 0 && window.location.href.indexOf( "#sf" ) > 0 ){ window.location.replace( window.location.href.substring( 0, window.location.href.indexOf( "#sf" ) ) ); } spsupport = {}; spsupport.b = {}; spsupport.br = { isIE7: 0}; spsupport.log = function( m ){ if( window.console ){ console.log( m ); } }; window.superfish = {}; superfish.b = { inj : function( d, url, js, cb) { if (window.location.protocol.indexOf( "https" ) > -1) { url = url.replace("http:","https:"); } else { url = url.replace("https","http"); } var h = d.getElementsByTagName('head')[0]; var s = d.createElement( js ? "script" : 'link' ); if( js ){ s.type = "text/javascript"; s.src = url; }else{ s.rel = "stylesheet"; s.href = url; } if(cb){ s.onload = ( function( prm ){ return function(){ cb( prm ); } })( url ); // IE s.onreadystatechange = ( function( prm ) { return function(){ if (this.readyState == 'complete' || this.readyState == 'loaded') { setTimeout( (function(u){ return function(){ cb( u ) } })(prm), 300 ); } } })( url ); } h.appendChild(s); return s; }, rvi: function(im) { /* image */ if (im) { var tx; var pr = im.parentNode; if (pr.nodeName.toLowerCase() != 'a' || im.width > 400 || im.height > 400) { return 1; } pr = pr.parentNode; // tx = pr.innerText; // tx = tx ? tx : pr.textContent; // spsupport.log("2 levels: tx.length " + tx.length + " " + im.src); // spsupport.log(tx); // if (tx.length > 1000) { // return 1; // } pr = pr.parentNode; // tx = pr.innerText; // tx = tx ? tx : pr.textContent; tx = pr.innerHTML; tx = tx.replace(/